import { createRouter, createWebHistory } from 'vue-router';
import routes from '@/router/routes';
import createPermissionGuard from '@/router/guard';
import type { App } from 'vue';

export const router = createRouter({
    history: createWebHistory(),
    routes
});
export function setupRouter(app: App) {
    app.use(router);
    createPermissionGuard(router);
}
